
import {getStore} from "../storage/storage"
import {axios} from "../utils/axios";
import qs from "qs";

const backUrl = {
    getLoginInfo: '/login/getLoginInfo',
    getImageUrl: '/user/image',
    editUserPasswordUrl: '/user/editPassword',
}

// 获取登录用户的名字
export function getLoginInfo(parameter){
    return axios({
        url: backUrl.getLoginInfo,
        method: 'get',
        params: parameter,
        headers: {
            token: getStore("token")
        },
    })
}

// 获取图片
export function getImage(parameter){
    return axios({
        url: backUrl.editUserPasswordUrl,
        method: 'post',
        data: parameter,
        headers: {
            token: getStore("token")
        },
    })
}

// 修改密码
export function editUserPassword(parameter){
    return axios({
        url: backUrl.editUserPasswordUrl,
        method: 'post',
        data: parameter,
        headers: {
            token: getStore("token")
        },
    })
}
 
// 获取用户列表点击查询
export function getUserListClickQuery(parameter){
    return axios({
        url: "/user/getUserList",
        method: 'get',
        params: parameter,
        headers: {
            token: getStore("token")
        },
    })
}
